_Get Calendar Events
(21 actions, 21 KB)
0 Get Dictionary from
[Shortcut Input]
»
1
4
1 Get Dictionary Value for
calType
in
[0 Dictionary]
➔ calType
»
2
6
2 DataJar > GetValueIntent »
keyPath
:
My Calendar.
[1 calType]
3 Repeat with Each in
[2 Value]
4 Adjust
Get Start of Day
Date
[0 Dictionary
.date
]
➔ dayStart
»
5
7
9
Duration
:
"24" hr
5 Adjust Add Date
[4 dayStart]
➔ dayEnd
»
7
9
Duration
:
"24" hr
6 If
[1 calType
’s Name
]
is
all-day
7 Find Calendar Events All Calendar Events where
ContentItemFilter
:
• All the following are true Start Date is between
[4 dayStart]
and
[5 dayEnd]
Calendar is
[Repeat Item]
Is All Day
8 Otherwise
9 Find Calendar Events
Library
where
ContentItemFilter
:
• All the following are true Start Date is between
[4 dayStart]
and
[5 dayEnd]
Calendar is
[Repeat Item]
Is Not All Day
10 End If
11 End Repeat with Each ▵
3
➔ unsortedCalEvents
»
12
18
12 Repeat with Each in
[11 unsortedCalEvents]
13 Format Date
[Repeat Item
’s Start Date{"Date Style":"Medium","WFISO8601IncludeTime":false,"Time Style":"Short"}
]
»
DateFormatStyle
:
None
14 Set Name of
[Repeat Index]
to
[13 Formatted Date]
15 End Repeat with Each »
16 Filter Files
[15 Repeat Results]
»
ContentItemSortProperty
:
Name
ContentItemSortOrder
:
A to Z
17 Repeat with Each in
[16 Files]
18 Get
Item At Index
[Repeat Item]
from List
[11 unsortedCalEvents]
19 End Repeat with Each
➔ sortedCalEvents
»
20 Stop and Output
[19 sortedCalEvents]